/**
 * 
 */
package com.softcits.hw;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import com.softcits.hw.aop.Caculator;
import com.softcits.hw.aop.ICaculator;

/**
 * @author dac
 *
 */
@Configuration
@EnableAspectJAutoProxy
@ComponentScan(basePackages= {"com.softcits.hw.aop"})
public class AopApplication {

    /**
     * @param args
     */
    public static void main(String[] args) {
        AnnotationConfigApplicationContext ctx = 
                new AnnotationConfigApplicationContext(AopApplication.class);
        ICaculator cal = ctx.getBean(ICaculator.class);
        ICaculator cal2 = (ICaculator) ctx.getBean("cal");
        cal2.divide(12, 3);


    }

}
